﻿Imports System.Data.Sql
Imports System.Data.SqlClient
Imports Microsoft.SqlServer

Partial Class crearevento
    Inherits System.Web.UI.Page

    Protected Sub ASPxButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ASPxButton1.Click


        Dim connectionstring As String = vbNull

        Dim conn As SqlConnection

        connectionstring = "Data Source=software.iccsps.com;Initial Catalog=Agenda_Facebook;Persist Security Info=True;User ID=software;Password=Xewh281!"
        conn = New SqlConnection(connectionstring)

        conn.Open()



        Dim Query As SqlCommand = New SqlCommand("insertarevento", conn)
        Query.CommandType = Data.CommandType.StoredProcedure

        'Query.Parameters.Add("@prvEmpresa", SqlDbType.VarChar, 50)
        'Query.Parameters.Add("@prvDireccion", SqlDbType.VarChar, 50)
        'Query.Parameters.Add("@prvTelefono", SqlDbType.VarChar, 50)
        'Query.Parameters.Add("@prvEmail", SqlDbType.VarChar, 50)
        'Query.Parameters.Add("@prvContacto", SqlDbType.VarChar, 50)
        'Query.Parameters.Add("@prvCodigo", SqlDbType.Int)

        '            Query.Parameters["@prvEmpresa"].Direction = ParameterDirection.Input
        '            Query.Parameters["@prvDireccion"].Direction = ParameterDirection.Input;
        '            Query.Parameters["@prvTelefono"].Direction = ParameterDirection.Input;
        '            Query.Parameters["@prvEmail"].Direction = ParameterDirection.Input;
        '            Query.Parameters["@prvContacto"].Direction = ParameterDirection.Input;
        '            Query.Parameters["@prvCodigo"].Direction = ParameterDirection.Output;

        '            Query.Parameters["@prvEmpresa"].Value = txt_prvEmpresa.Text;
        '            Query.Parameters["@prvDireccion"].Value = txt_prvDireccion.Text;
        '            Query.Parameters["@prvTelefono"].Value = txt_prvTelefono.Text;
        '            Query.Parameters["@prvEmail"].Value = txt_prvEmail.Text;
        '            Query.Parameters["@prvContacto"].Value = txt_prvContacto.Text;

        '            Query.ExecuteNonQuery();
        '            cnn.Close();

        '            txt_prvCodigo.Text = Convert.ToString(Query.Parameters["@prvCodigo"].Value);
    End Sub
End Class
